var myChart = echarts.init(document.getElementById("idx1"))
var option = {
    xAxis: {
        type:'category',
    },
    title: {
        text: '周子昂',
    },
    yAxis: {},
    grid: {},
    series: [{
        type:'line',
        data: [4,6,3,5],
    }],
};
myChart.setOption(option)
//----------------------------------------
var myChart2 = echarts.init(document.getElementById("idx2"))
var option2 = {
    xAxis: [{
        type:'category',
        gridIndex: 0,
    },{
        type:'category',
        gridIndex: 1,
    }],
    title: {
        text: '周子昂',
    },
    yAxis: [
        {
            gridIndex: 0,
            type:'category',
        },
        {
            gridIndex: 1,
            type:'category',
        },
    ],
    grid: [
        {
            top: '5%',
            bottom: '55%',
            left: '15%',
            right: '15%',
        },
        {
            left: '15%',
            right: '15%',
            bottom: '5%',
            top: '60%',
        },
    ],
    series: [{
        type:'line',
        // data: [4,6,3,5],
    }],
};
myChart2.setOption(option2)
//----------------------------------------
var myChart3 = echarts.init(document.getElementById("idx3"))
var option3 = {
    title: {
        text: '周子昂',
    },
    xAxis: [
        {type:'category',gridIndex: 0},
        {type:'category',gridIndex: 1,name:'xxx'},
        {type:'category',gridIndex: 2},
        {type:'category',gridIndex: 3},
    ],
    yAxis: [
        {type:'category',gridIndex: 0},
        {type:'category',gridIndex: 1,type:'value'},
        {type:'category',gridIndex: 2},
        {type:'category',gridIndex: 3},
    ],
    grid: [
        {top: '4%',bottom: '55%',left: '5%',right: '60%'},
        {left: '55%',right: '8%',bottom: '55%',top: '4%'},   
        {left: '5%',right: '60%',bottom: '5%',top: '60%'},
        {left: '55%',right: '8%',bottom: '5%',top: '60%'},
    ],
    series: [{
        type:'line',
        data: [4,6,3,5],
        xAxisIndex: 1,
        yAxisIndex: 1,
    }],
};
myChart3.setOption(option3)
//-------------------------------------------------
var myChart4 = echarts.init(document.getElementById("idx4"))
var option4 = {
    title: {
        text: '周子昂',
    },
    xAxis: [
        {
            type:'category',
            data: ['一季度','二季度','三季度','四季度'],
            // position: 'top',
            axisLabel: {
                color: 'red',
                fontFamily: 'monospace',
                formatter: function(value){
                    return value.split("").join("\n")
                },
                
            },
            axisLine: {
                // show: false,
                lineStyle: {
                    color: 'green',
                    shadowBlur: 10,
                    opacity: 1,
                    width: 2,
                    shadowColor: 'red',
                },
            },
            axisTick: {
                show: true,
                length: 10,
                inside: true,
            },
            axisPointer: {
                show: true,
                label: {
                    color: 'red',
                    backgroundColor: 'white',
                },
            },
            name: '时间',
            nameLocation: 'middle',
            nameGap: 30,
            nameRotate: 90,
            nameTextStyle: {
                fontFamily: 'monospace',
                fontSize: 15,
                fontStyle: 'italic',
                fontWeight: 'bold',
                color: 'blue',
            },
            splitArea: {
                show: true,
                areaStyle: {
                    color: ['red','white','black','gray'],
                    opacity: 0.5,
                },
            },
            splitLine: {
                show: true,
                lineStyle: {
                    width: 5,
                    color: ['blue','green'],
                },
            },
        },
    ],
    yAxis: {
        min: 2,
        max: 10,
        name: '销量',
        position: 'right',
        nameTextStyle: {
            fontSize: 12,
            fontStyle: 'italic',
        },
    },
    grid: [
        {},
    ],
    series: [{
        type:'line',
        data: [4,6,9,5],
    }],
};
myChart4.setOption(option4)
//-------------------------------------------------
var myChart5 = echarts.init(document.getElementById("idx5"))
var option5 = {
    title: {
        text: '周子昂',
    },
    xAxis: [
        {
            type:'category',
            data: ['一季度','二季度','三季度','四季度'],
            // position: 'top',
            axisLabel: {
                color: 'red',
                fontFamily: 'monospace',
                formatter: function(value){
                    return value.split("").join("\n")
                },
                
            },
            name: '时间',
            nameLocation: 'middle',
            nameGap: 30,
            nameRotate: 90,
            nameTextStyle: {
                fontFamily: 'monospace',
                fontSize: 15,
                fontStyle: 'italic',
                fontWeight: 'bold',
                color: 'blue',
            },
            
        },
    ],
    yAxis: {
        min: 2,
        max: 10,
        name: '销量',
        position: 'left',
        nameTextStyle: {
            fontSize: 12,
            fontStyle: 'italic',
        },
        axisLine: {
            // show: false,
            lineStyle: {
                color: 'green',
                shadowBlur: 10,
                opacity: 1,
                width: 2,
                shadowColor: 'red',
            },
        },
        axisTick: {
            show: true,
            length: 10,
            inside: true,
        },
        axisPointer: {
            show: true,
            label: {
                color: 'red',
                backgroundColor: 'white',
            },
        },
        splitArea: {
            show: true,
            areaStyle: {
                color: ['red','white','black','gray'],
                opacity: 0.5,
            },
        },
        splitLine: {
            show: true,
            lineStyle: {
                width: 5,
                color: ['blue','green'],
            },
        },
    },
    grid: [
        {},
    ],
    series: [{
        type:'line',
        data: [4,6,9,5],
    }],
};
myChart5.setOption(option5)
//---------------------------------------------------
var myChart6 = echarts.init(document.getElementById("idx6"))
var option6 = {
    xAxis: {
        name: '日期',
        type: 'category',
        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
    },
    yAxis: {
        name: '销售量',
        type: 'value',
        // data: [10,20,30,40],
    },
    title: {
        text: 'XX销量--周子昂',
        left: 'center',
    },
    legend: {
        top: 'bottom',
    },
    tooltip: {
        trigger: 'axis',
    },
    series:[{
        type:'scatter',
        name: '馒头',
        data:[10,13,15,14,17],
        symbol: 'diamond',
        symbolSize: 20,
    },{
        type:'line',
        name: '包子',
        smooth: true,
        data:[7,4,5,9,8],
        symbolSize: 20,
    },{
        type:'line',
        name: '烧饼',
        data:[4,2,3,8,5],
        symbol: 'triangle',
        symbolSize: 20,
    }],
};
myChart6.setOption(option6)